<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	<meta name="description" content="Responsive Bootstrap 4 Admin Template">
	<meta name="author" content="Bootlab">

	<title>demo_客户_资产_应收账款_add</title>

	<link href="css/classic.css" rel="stylesheet">
	<link href="css/ext.css" rel="stylesheet">
</head>

<body>
	<div class="wrapper">

		<nav class="sidebar">
			<div class="sidebar-content">
				<a class="sidebar-brand" href="index.html">
					<i class="align-middle" data-feather="box"></i>
					<span class="align-middle">AppStack</span>
				</a>
			</div>
			<ul id='sidebar-menu' class="sidebar-nav">
				<script id="script_menu" type="text/x-handlebars-template">

						{{#each menuitems}}
							<li class="sidebar-header">
								{{title}}
							</li>
							{{#if groups}}
								{{#each groups}}
									<li class="sidebar-item" {{#if ../actived }} active {{/if}}>

										<a href="{{href}}" data-toggle="collapse" class="sidebar-link 	{{#if this.actived}} {{else}} collapsed {{/if}}">
											<i class="align-middle" data-feather={{icon}}></i> <span class="align-middle">{{title}}</span>
										</a>

										{{#if items}}
											<ul id="{{id}}" class="sidebar-dropdown list-unstyled collapse  	{{#if this.actived}} show {{else}} {{/if}}">
												{{#each items}}

													<li class="sidebar-item {{#if actived}} active {{/if}}">
														<a class="sidebar-link " href={{href}}>{{title}}</a>
													</li>
												{{/each}}
											</ul>
										{{/if}}
									</li>
								{{/each}}
							{{/if}}
						{{/each}}
					</script>
			</ul>

		</nav>

		<div class="main">
			<nav class="navbar navbar-expand navbar-light bg-white">
				<a class="sidebar-toggle d-flex mr-2">
					<i class="hamburger align-self-center"></i>
				</a>

				<form class="form-inline d-none d-sm-inline-block">
					<input class="form-control mr-sm-2" type="text" placeholder="Search projects" aria-label="Search">
				</form>

				<div class="navbar-collapse collapse">
					<ul class="navbar-nav ml-auto">
						<li class="nav-item dropdown">
							<a class="nav-icon dropdown-toggle" href="#" id="messagesDropdown" data-toggle="dropdown">
								<div class="position-relative">
									<i class="align-middle" data-feather="message-circle"></i>
									<span class="indicator">4</span>
								</div>
							</a>
							<div class="dropdown-menu dropdown-menu-lg dropdown-menu-right py-0"
								aria-labelledby="messagesDropdown">
								<div class="dropdown-menu-header">
									<div class="position-relative">
										4 New Messages
									</div>
								</div>
								<div class="list-group">
									<a href="#" class="list-group-item">
										<div class="row no-gutters align-items-center">
											<div class="col-2">
												<img src="img/avatar-5.jpg" class="avatar img-fluid rounded-circle"
													alt="Ashley Briggs">
											</div>
											<div class="col-10 pl-2">
												<div class="text-dark">Ashley Briggs</div>
												<div class="text-muted small mt-1">Nam pretium turpis et arcu. Duis
													arcu
													tortor.</div>
												<div class="text-muted small mt-1">15m ago</div>
											</div>
										</div>
									</a>
									<a href="#" class="list-group-item">
										<div class="row no-gutters align-items-center">
											<div class="col-2">
												<img src="img/avatar-2.jpg" class="avatar img-fluid rounded-circle"
													alt="Carl Jenkins">
											</div>
											<div class="col-10 pl-2">
												<div class="text-dark">Carl Jenkins</div>
												<div class="text-muted small mt-1">Curabitur ligula sapien euismod
													vitae.</div>
												<div class="text-muted small mt-1">2h ago</div>
											</div>
										</div>
									</a>
									<a href="#" class="list-group-item">
										<div class="row no-gutters align-items-center">
											<div class="col-2">
												<img src="img/avatar-4.jpg" class="avatar img-fluid rounded-circle"
													alt="Stacie Hall">
											</div>
											<div class="col-10 pl-2">
												<div class="text-dark">Stacie Hall</div>
												<div class="text-muted small mt-1">Pellentesque auctor neque nec
													urna.
												</div>
												<div class="text-muted small mt-1">4h ago</div>
											</div>
										</div>
									</a>
									<a href="#" class="list-group-item">
										<div class="row no-gutters align-items-center">
											<div class="col-2">
												<img src="img/avatar-3.jpg" class="avatar img-fluid rounded-circle"
													alt="Bertha Martin">
											</div>
											<div class="col-10 pl-2">
												<div class="text-dark">Bertha Martin</div>
												<div class="text-muted small mt-1">Aenean tellus metus, bibendum
													sed,
													posuere ac, mattis non.
												</div>
												<div class="text-muted small mt-1">5h ago</div>
											</div>
										</div>
									</a>
								</div>
								<div class="dropdown-menu-footer">
									<a href="#" class="text-muted">Show all messages</a>
								</div>
							</div>
						</li>
						<li class="nav-item dropdown">
							<a class="nav-icon dropdown-toggle" href="#" id="alertsDropdown" data-toggle="dropdown">
								<div class="position-relative">
									<i class="align-middle" data-feather="bell-off"></i>
								</div>
							</a>
							<div class="dropdown-menu dropdown-menu-lg dropdown-menu-right py-0"
								aria-labelledby="alertsDropdown">
								<div class="dropdown-menu-header">
									4 New Notifications
								</div>
								<div class="list-group">
									<a href="#" class="list-group-item">
										<div class="row no-gutters align-items-center">
											<div class="col-2">
												<i class="text-danger" data-feather="alert-circle"></i>
											</div>
											<div class="col-10">
												<div class="text-dark">Update completed</div>
												<div class="text-muted small mt-1">Restart server 12 to complete the
													update.</div>
												<div class="text-muted small mt-1">2h ago</div>
											</div>
										</div>
									</a>
									<a href="#" class="list-group-item">
										<div class="row no-gutters align-items-center">
											<div class="col-2">
												<i class="text-warning" data-feather="bell"></i>
											</div>
											<div class="col-10">
												<div class="text-dark">Lorem ipsum</div>
												<div class="text-muted small mt-1">Aliquam ex eros, imperdiet
													vulputate
													hendrerit et.</div>
												<div class="text-muted small mt-1">6h ago</div>
											</div>
										</div>
									</a>
									<a href="#" class="list-group-item">
										<div class="row no-gutters align-items-center">
											<div class="col-2">
												<i class="text-primary" data-feather="home"></i>
											</div>
											<div class="col-10">
												<div class="text-dark">Login from 192.186.1.1</div>
												<div class="text-muted small mt-1">8h ago</div>
											</div>
										</div>
									</a>
									<a href="#" class="list-group-item">
										<div class="row no-gutters align-items-center">
											<div class="col-2">
												<i class="text-success" data-feather="user-plus"></i>
											</div>
											<div class="col-10">
												<div class="text-dark">New connection</div>
												<div class="text-muted small mt-1">Anna accepted your request.</div>
												<div class="text-muted small mt-1">12h ago</div>
											</div>
										</div>
									</a>
								</div>
								<div class="dropdown-menu-footer">
									<a href="#" class="text-muted">Show all notifications</a>
								</div>
							</div>
						</li>
						<li class="nav-item dropdown">
							<a class="nav-link dropdown-toggle" href="#" id="userDropdown" data-toggle="dropdown">
								<span class="d-inline-block d-md-none">
									<i class="align-middle" data-feather="settings"></i>
								</span>
								<span class="d-none d-sm-inline-block">
									<img src="img/avatar.jpg" class="avatar img-fluid rounded-circle mr-1"
										alt="Chris Wood" /> <span class="text-dark">Chris Wood</span>
								</span>
							</a>
							<div class="dropdown-menu dropdown-menu-right" aria-labelledby="userDropdown">
								<a class="dropdown-item" href="#"><i class="align-middle mr-1" data-feather="user"></i>
									Profile</a>
								<a class="dropdown-item" href="#"><i class="align-middle mr-1"
										data-feather="pie-chart"></i>
									Analytics</a>
								<div class="dropdown-divider"></div>
								<a class="dropdown-item" href="#">Settings & Privacy</a>
								<a class="dropdown-item" href="#">Help</a>
								<a class="dropdown-item" href="#">Sign out</a>
							</div>
						</li>
					</ul>
				</div>
			</nav>

			<main class="content">
				<div class="container-fluid p-0">
					<div class="row">
						<div class="col-12">
							<div class="card">
								<div class="card-header">
									<h5 class="card-title">资产基本信息</h5>
									<h6 class="card-subtitle text-muted">资产创建表单</h6>
								</div>
								<div class="card-body">
									<form>
										<div class="row">
											<div class="col-md-8">
												<div class="form-group">
													<label>资产编号</label>
													<input type="text" class="form-control" value='ASSERT_20210526_001'
														disabled>
													<span class="font-13 text-muted">e.g "ASSET0001"</span>
												</div>
												<div class="form-group">
													<label>资产形态</label>
													<select class="form-control">
														<option selected>包</option>
														<option>池</option>
														<option>笔</ption>
													</select>
													<span class="font-13 text-muted">e.g "池、包、笔"</span>
												</div>
												<div class="form-group">
													<label>融资模式</label>
													<select class="form-control">
														<option selected>单笔</option>
														<option>多笔</option>
													</select>
													<span class="font-13 text-muted">e.g "单笔、多笔"</span>
												</div>

											</div>
											<div class="col-md-4">
												<div class="card flex-fill">
													<div class="card-header">
														<span class="badge badge-primary float-right">实时计算</span>
														<h5 class="card-title mb-0">资产价值</h5>
													</div>
													<div class="card-body my-2">
														<div class="row d-flex align-items-center mb-4">
															<div class="col-8">
																<h2
																	class="d-flex align-items-center mb-0 font-weight-light">
																	￥37,500
																</h2>
															</div>
															<div class="col-4 text-right">
																<span class="text-muted">34笔</span>
															</div>
														</div>


													</div>
												</div>
												<div class="card flex-fill">
													<div class="card-header">
														<span class="badge badge-primary float-right">实时计算</span>
														<h5 class="card-title mb-0">有效资产价值</h5>
													</div>
													<div class="card-body my-2">
														<div class="row d-flex align-items-center mb-4">
															<div class="col-8">
																<h2
																	class="d-flex align-items-center mb-0 font-weight-light">
																	￥36,000
																</h2>
															</div>

														</div>


													</div>
												</div>
											</div>
										</div>

										<button type="submit" class="btn btn-primary">保存变化</button>
										<button type="submit" class="btn btn-primary">提交申请</button>
									</form>

								</div>
							</div>
						</div>
					</div>



					<div class="row">

						<div class="col-6 col-lg-6">
							<div class="card">
								<div class="card-header mb-2">
									<span class=" badge badge-info mb-3">已经收集单据 </span>

									<form>
										<div class="form-row">
											<div class="form-group col-md-4">
												<label for="inputEmail4">销方</label>
												<input type="email" class="form-control" id="inputEmail4"
													placeholder="销售方">
											</div>
											<div class="form-group col-md-4">
												<label for="inputPassword4">购方</label>
												<input type="password" class="form-control" id="inputPassword4"
													placeholder="购方">
											</div>
											<div class="form-group col-md-4">
												<label class="form-label">到期日期</label>
												<input class="form-control" type="text" name="datesingle1" />
											</div>
										</div>
										<div class="form-row">

											<button type="submit" class="btn btn-primary">查询</button>


										</div>
									</form>
									<script>
										document.addEventListener("DOMContentLoaded", function (event) {


											$('input[name="datesingle1"]').daterangepicker({
												singleDatePicker: true,
												showDropdowns: true
											});
											var start = moment().subtract(29, 'days');
											var end = moment();


										});
									</script>
								</div>
								<div class="card-body">
									<table class="table" id="out">
										<thead>
											<tr>
												<th style="width:10%">号码</th>
												<th style="width:10%">类型</th>
												<th style="width:10%">票面金额</th>

												<th style="width:10%">销方</th>
												<th style="width:10%">购方</th>
												<th class="d-none d-md-table-cell" style="width:10%">开具日期</th>
												<th class="d-none d-md-table-cell" style="width:10%">付款日期</th>
												<th class="d-none d-md-table-cell" style="width:10%">单据状态</th>
												<th>详情</th>
											</tr>
										</thead>

									</table>
								</div>
								<div class="card-footer">
									<div class="form-row">

										<button type="submit" class="btn btn-primary">放入资产</button>


									</div>
								</div>
								<script>
									document.addEventListener("DOMContentLoaded", function () {
										// 定义的数组,根据数组,渲染生成页面内容
										var arr = [
											['1110123123', '发票', 18123, '瑞康', '医院1', '2020-01-01', '2020-07-01', '有效', ''],
											['1110123124', '发票', 1813, '瑞康', '医院1', '2020-01-01', '2020-08-01', '有效', ''],
											['1110123125', '发票', 18500, '瑞康', '医院1', '2020-01-01', '2020-06-01', '红冲撤销', ''],
											['1110123126', '发票', 17000, '瑞康', '医院1', '2020-01-01', '2020-08-01', '有效', ''],
											['1110123126', '发票', 12000, '瑞康', '医院2', '2020-01-01', '2020-08-01', '有效', ''],
											['1110123126', '发票', 18000, '瑞康', '医院2', '2020-01-01', '2020-08-01', '有效', ''],
											['1110123126', '发票', 18000, '瑞康', '医院2', '2020-01-01', '2020-08-01', '有效', ''],
											['1110123126', '发票', 18000, '瑞康', '医院2', '2020-01-01', '2020-08-01', '有效', ''],
											['1110123126', '发票', 18000, '瑞康', '医院2', '2020-01-01', '2020-08-01', '有效', ''],
											['1110123126', '发票', 18000, '瑞康', '医院2', '2020-01-01', '2020-08-01', '有效', ''],
											['1110123126', '发票', 18000, '瑞康', '医院2', '2020-01-01', '2020-08-01', '有效', ''],
											['1110123126', '发票', 18000, '瑞康', '医院2', '2020-01-01', '2020-08-01', '有效', '']
										];

										// 定义变量,存储要写入的内容
										$('#out').DataTable({
											data: arr,
											"searching": false,
											"bAutoWidth": false,



											"order": [
												[4, "desc"]
											],
											columns: [

												{
													//column2 单据号码
												},
												{
													//column3 类型
												},
												{
													//column4 票面金额
												},
												{
													//column5 销方
												},
												{
													//column6 购方
												},
												{
													//column7 开具日期
												},
												{
													//column8 付款日期
												},
												{
													//column9 状态
												},
												{
													title: "详情",
													render: function (data, type, row, meta) {
														console.log(type)
														return type === 'display' ?
															`<td class="table-action"> <input type="checkbox" class="editor-active ">  <a href="demo_凭证_单据_detail.html"><i class="align-middle" data-feather="eye"></i></a></td>` : ''
													}
												}

											]
										});

									});
								</script>
							</div>
						</div>

						<div class="col-6 col-lg-6">
							<div class="card ">

								<div class="card-header mb-2">

									<span class=" badge badge-success mb-3">入资产单据</span>
									<form>
										<div class="form-row">
											<div class="form-group col-md-4">
												<label for="inputEmail4">销方</label>
												<input type="email" class="form-control" id="inputEmail4"
													placeholder="销售方">
											</div>
											<div class="form-group col-md-4">
												<label for="inputPassword4">购方</label>
												<input type="password" class="form-control" id="inputPassword4"
													placeholder="购方">
											</div>
											<div class="form-group col-md-4">
												<label class="form-label">到期日期</label>
												<input class="form-control" type="text" name="datesingle2" />
											</div>
										</div>
										<div class="form-row">


											<button type="submit" class="btn btn-primary">查询</button>

										</div>
									</form>
									<script>
										document.addEventListener("DOMContentLoaded", function (event) {


											$('input[name="datesingle2"]').daterangepicker({
												singleDatePicker: true,
												showDropdowns: true
											});
											var start = moment().subtract(29, 'days');
											var end = moment();


										});
									</script>
								</div>
								<div class="card-body">
									<table class="table" id="in">
										<thead>
											<tr>

												<th style="width:10%;">单据号码</th>
												<th style="width:10%">类型</th>
												<th style="width:10%">票面金额</th>

												<th style="width:10%">销方</th>
												<th style="width:10%">购方</th>
												<th class="d-none d-md-table-cell" style="width:10%">开具日期</th>
												<th class="d-none d-md-table-cell" style="width:10%">付款日期</th>
												<th class="d-none d-md-table-cell" style="width:10%">单据状态</th>
												<th>详情</th>
											</tr>
										</thead>

									</table>
								</div>
								<div class="card-footer">
									<div class="form-row">

										<button type="submit" class="btn btn-primary">清空列表</button>


									</div>
									<script>
										document.addEventListener("DOMContentLoaded", function () {
											// 定义的数组,根据数组,渲染生成页面内容
											var arr = [
												['1110123123', '发票', 18123, '瑞康', '医院1', '2020-01-01', '2020-07-01', '有效', ''],
												['1110123124', '发票', 1813, '瑞康', '医院1', '2020-01-01', '2020-08-01', '有效', ''],
												['1110123125', '发票', 18500, '瑞康', '医院1', '2020-01-01', '2020-06-01', '红冲撤销', ''],
												['1110123126', '发票', 17000, '瑞康', '医院1', '2020-01-01', '2020-08-01', '有效', ''],
												['1110123126', '发票', 12000, '瑞康', '医院2', '2020-01-01', '2020-08-01', '有效', ''],
												['1110123126', '发票', 18000, '瑞康', '医院2', '2020-01-01', '2020-08-01', '有效', ''],
												['1110123126', '发票', 18000, '瑞康', '医院2', '2020-01-01', '2020-08-01', '有效', ''],
												['1110123126', '发票', 18000, '瑞康', '医院2', '2020-01-01', '2020-08-01', '有效', ''],
												['1110123126', '发票', 18000, '瑞康', '医院2', '2020-01-01', '2020-08-01', '有效', ''],
												['1110123126', '发票', 18000, '瑞康', '医院2', '2020-01-01', '2020-08-01', '有效', ''],
												['1110123126', '发票', 18000, '瑞康', '医院2', '2020-01-01', '2020-08-01', '有效', ''],
												['1110123126', '发票', 18000, '瑞康', '医院2', '2020-01-01', '2020-08-01', '有效', '']
											];

											var sum_evidence_asset_value = arr.reduce(function (total, cur, index, array) {
												console.log(cur)
												total += cur[2]
												return total
											}, 0)

											// 定义变量,存储要写入的内容
											$('#in').DataTable({
												data: arr,
												"bAutoWidth": false,
												"searching": false,
												"infoCallback": function (settings, start, end, max, total, pre) {


													return `<span class='mr-1'>资产金额合计:</span><span class="  badge badge-primary ">${sum_evidence_asset_value}</span> 元 <span class='mr-1'>  `
												},



												"order": [
													[4, "desc"]
												],
												columns: [

													{
														//column2 单据号码
													},
													{
														//column3 类型
													},
													{
														//column4 票面金额
													},
													{
														//column5 销方
													},
													{
														//column6 购方
													},
													{
														//column7 开具日期
													},
													{
														//column8 付款日期
													},
													{
														//column9 状态
													},
													{
														title: "详情",
														render: function (data, type, row, meta) {
															console.log(type)
															return type === 'display' ?
																`<td class="table-action">    <a href="#" data-toggle="modal"
											data-target="#centeredModalSuccess" ><i class="align-middle" data-feather="delete"></i></a></td>` : ''
														}
													}

												]
											});

										});
									</script>
								</div>
								<div class="modal fade" id="centeredModalSuccess" tabindex="-1" role="dialog"
									aria-hidden="true">
									<div class="modal-dialog modal-dialog-centered" role="document">
										<div class="modal-content">
											<div class="modal-header">
												<h5 class="modal-title">提示框</h5>
												<button type="button" class="close" data-dismiss="modal"
													aria-label="Close">
													<span aria-hidden="true">&times;</span>
												</button>
											</div>
											<div class="modal-body m-3">
												<p class="mb-0">确认删除此单据</p>
											</div>
											<div class="modal-footer">
												<button type="button" class="btn btn-secondary"
													data-dismiss="modal">Close</button>
												<button type="button" class="btn btn-success">确认
												</button>
											</div>
										</div>
									</div>
								</div>






							</div>


						</div>

					</div>
			</main>

		</div>

	</div>
	<script src="js/app.js">		</script>
	<script src="js/initDataTables.js"></script>
	<script src="js/libs/datatables/dataTables.select.min.js"></script>
	<script src="js/libs/datatables/dataTables.buttons.min.js"></script>
	<script src="js/libs/handlebars/handlebars.min-v4.7.7.js"></script>
	<script src="js/initMenuMessageAlert.js"></script>

	<script type="text/javascript">
		document.addEventListener("DOMContentLoaded", function () {

			initSidebarMenu(2, 1, 0)

			var tpl_siderbar = $("#script_menu").html();
			var template_sdb = Handlebars.compile(tpl_siderbar);
			var content = template_sdb(menu_json_data);
			$("#sidebar-menu").html(content)

			//模版渲染
			var tpl_alerts = $("#script_alerts").html();
			var template_alt = Handlebars.compile(tpl_alerts);
			var content = template_alt(alerts);
			$("#alerts").html(content)



			//模版渲染
			var tpl_messages = $("#script_messages").html();
			var template_msg = Handlebars.compile(tpl_messages);
			var content = template_msg(messages);
			$("#messages").html(content)



		});
	</script>







</body>

</html>